package com.zry.yard.ui.activity

import com.zry.yard.R
import com.zry.yard.databinding.ActivityDistributorListBinding
import com.zry.yard.presenter.DistributorListPresenter
import com.zry.yard.ui.base.BaseActivity
import kotlinx.android.synthetic.main.common_title.*

class DistributorListActivity : BaseActivity() {
    private var distributorListPresenter: DistributorListPresenter? = null
    private var distributorListBinding: ActivityDistributorListBinding? = null

    override fun getLayoutId(): Int {
        return R.layout.activity_distributor_list
    }

    override fun initData() {

        titleCenterText.text = "经销商列表"
        commonLeftLinearLayout.setOnClickListener { finish() }


        distributorListBinding = viewDataBinding as ActivityDistributorListBinding
        distributorListPresenter = DistributorListPresenter(this)
        distributorListBinding?.handlerClick = distributorListPresenter

        distributorListPresenter?.initRecycler()
        distributorListPresenter?.getCustomerList("", 1, 999)
    }
}
